﻿
    <div ms-controller="INFO">

    <div class="control-group">
        <label class="control-label">原始密码：</label>
        <div class="controls">
            <input class="input-xlarge input-xfat" placeholder="请输入原始密码" type='password' ms-duplex="modelData.pwd1" data-rules="required|minlength=1|maxlength=50"  />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">新密码：</label>
        <div class="controls">
            <input class="input-xlarge input-xfat" placeholder="请输入新密码" type='password' ms-duplex="modelData.pwd2" data-rules="required|minlength=1|maxlength=100"  />
        </div>
    </div>
</div>



<script type="text/javascript">

    var tempmodel = avalon.define({
        $id: "INFO",
        authData: [],
        modelData: { "pwd1": "", "pwd2": "" },
        inittemp: function (strId) {

        },
        SaveData: function (dom, formtype, status) {

            ComFunJS.postJSON("BASE_CHNPWD", { "P1": tempmodel.modelData.pwd1, "P2": tempmodel.modelData.pwd2 }, function (r) {
                if (r.error == "") {
                    top.ComFunJS.winShowMsg("操作成功");
                    top.ComFunJS.close();
                } else {
                    top.ComFunJS.winShowMsg(r.error);
                }
            })

        }


    })

</script>
